package com.liyunc.demo.comp.entity.base;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.MappedSuperclass;
import java.time.LocalDateTime;

/**
 * @author liyuncong
 * @version 1.0
 * @file AuditableEntity.java
 * @brief AuditableEntity
 * @details AuditableEntity
 * @date 2022-03-04
 * Edit History
 * ----------------------------------------------------------------------------
 * DATE                     NAME               DESCRIPTION
 * 2022-03-04                       Created
 */
@MappedSuperclass
@Getter
@Setter
public abstract class AuditableEntity extends LogicRemovableEntity {
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long createdBy;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updatedBy;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime createdAt;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
}
